package com.nefu.softlab.xjwc.shiro;

import com.nefu.softlab.xjwc.utils.GetRandom;
import org.apache.shiro.session.Session;
import org.apache.shiro.session.mgt.eis.SessionIdGenerator;

import java.io.Serializable;

/**
 * @author : Ar1es
 * @date : 2020/1/12
 * @since : Java 8
 */
public class CustomSessionIdGenerator implements SessionIdGenerator {

    @Override
    public Serializable generateId(Session session) {
        return "xjwc" + GetRandom.getUUID();
    }
}
